#ifndef EYERWANDARTIST_DESKTOPTEST_HPP
#define EYERWANDARTIST_DESKTOPTEST_HPP

#include <gtest/gtest.h>
#include <stdlib.h>

#include "EWAUITimeline/EWAUITimelineHeader.hpp"

TEST(EWADesktop, EWADesktopTest)
{
    Eyer::EyerSmartPtr<Eyer::EWAUITimelineContext> timelineCtx(new Eyer::EWAUITimelineContext());
    Eyer::EWAUITimelinePlusWidget timelineWidget(timelineCtx, Eyer::LP::MATCH_PARENT, Eyer::LP::MATCH_PARENT);

    for(int i=0;i<5;i++){
        Eyer::EyerString trackId = Eyer::EyerString("Track: ") + Eyer::EyerString::Number(i);
        timelineWidget.AddTrack(trackId);
    }

    for(int i=0;i<5;i++){
        Eyer::EyerSmartPtr<Eyer::EWAPrjFragmentFragmentResourse> fragment(new Eyer::EWAPrjFragmentFragmentResourse());
        timelineWidget.InsertFragment(fragment, 0);
    }

    for(int i=0;i<1000 * 10; i++){
        int width = 1920;
        int height = 720;
        timelineWidget.OnMeasure(width, height);

        timelineWidget.Draw();
        int graphSize = timelineWidget.GetUIGraphSize();
        for(int i=0;i<graphSize;i++) {
            Eyer::EyerSmartPtr <Eyer::EWAUIGraph> g = timelineWidget.GetUIGraph(i);
        }
    }
}

#endif //EYERWANDARTIST_DESKTOPTEST_HPP
